# Contributor: Maarten van Gompel <proycon@anaproy.nl>
# Maintainer: Maarten van Gompel <proycon@anaproy.nl>
pkgname=libnfc
pkgver=1.8.0
pkgrel=1
pkgdesc="Platform independent Near Field Communication (NFC) library"
url="http://nfc-tools.org"
arch="all"
license="LGPL-3.0-or-later"
makedepends="
	bsd-compat-headers
	libusb-compat-dev
	linux-headers
	openssl-dev
	"
subpackages="$pkgname-dev $pkgname-tools $pkgname-doc"
source="$pkgname-$pkgver.tar.bz2::https://github.com/nfc-tools/libnfc/releases/download/libnfc-$pkgver/libnfc-$pkgver.tar.bz2"

build() {
	CFLAGS="$CFLAGS -flto=auto" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--disable-static
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

tools() {
	pkgdesc="$pkgdesc (tools)"

	amove usr/bin
}

sha512sums="
aa8762ecb5b94167d20346f2c81491bb5b634bcedbf2aae3e2efdb301bca89ceb7c2e15148d0934fdc1cce6d77ee0225e28e84893232999fdc09d8a90ae2a7c5  libnfc-1.8.0.tar.bz2
"
